<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<div class="form-horizontal">

  <div class="form-group">
    <label class="control-label col-xs-2">身高：</label>
    <div class="col-xs-4 pull-left">
      <p class="form-control-static">${student.user.userFit.height}&nbsp;&nbsp;CM</p>
    </div>
    <label class="control-label col-xs-2">体重：</label>
    <div class="col-xs-4 pull-left">
      <p class="form-control-static">${student.user.userFit.weight}&nbsp;&nbsp;KG</p>
    </div>
  </div>
  
  <div class="form-group">
    <label class="control-label col-xs-2">年龄：</label>
    <div class="col-xs-4 pull-left">
      <p class="form-control-static">${student.user.userFit.age}</p>
    </div>
    <label class="control-label col-xs-2">BMI：</label>
    <div class="col-xs-4 pull-left">
      <p class="form-control-static">${student.user.userFit.bmiValue}</p>
   </div>
  </div>   
  
    <div class="form-group">
    <label class="control-label col-xs-2">当前体型最小BMI值：</label>
    <div class="col-xs-4 pull-left">
      <p class="form-control-static">${student.user.userFit.shape.min}</p>
  </div>
  <label class="control-label col-xs-2">当前体型最大BMI值：</label>
    <div class="col-xs-4 pull-left">
      <p class="form-control-static">${student.user.userFit.shape.max}</p>
    </div>  
  </div>  
  
  <div class="form-group">
    <label class="control-label col-xs-2">SCORE计算的加数：</label>
    <div class="col-xs-4 pull-left">
      <p class="form-control-static">${student.user.userFit.shape.addenon}</p>
    </div>
    <label class="control-label col-xs-2">性别：</label>
    <div class="col-xs-4 pull-left">
      <p class="form-control-static">${student.user.userFit.gender.description}</p>
     </div>
  </div>  
   
</div>

<c:if test="${fitInvestigations != null}">
  <div class="x-breadcrumb-wrapper" style="margin-top:20px;">
    <div class="x-breadcrumb yellow clearfix">
      <h2>
        <span>BMI列表</span>
      </h2>
    </div>
  </div>
  
  <table class="table table-striped table-hover x-table" style="margin-bottom:20px;">
    <thead>
      <tr>
        <th>姓名</th>
        <th>身高</th>
        <th>体重</th>
        <th>年龄</th>
        <th>录入时间</th>
        <th>BMI</th>
      </tr>
    </thead>
    <tbody>
      <c:forEach var="fitInvestigation" items="${fitInvestigations}">
        <tr>
          <td>${fitInvestigation.user.name}</td>
          <td>${fitInvestigation.height}</td>
          <td>${fitInvestigation.weight}</td>
          <td>${fitInvestigation.age}</td>
          <td>${fitInvestigation.createTime}</td>
          <td>${fitInvestigation.bmiValue}</td>
        </tr>
      </c:forEach>
    </tbody>
  </table>
</c:if>

<c:if test="${inbodyRecords != null}">
  <div class="x-breadcrumb-wrapper" style="margin-top:20px;">
    <div class="x-breadcrumb yellow clearfix">
      <h2>
        <span>Inbody数据</span>
      </h2>
    </div>
  </div>
  
  <table class="table table-striped table-hover x-table" style="margin-bottom:20px;">
    <thead>
      <tr>
        <th>姓名<br />手机</th>
        <th>来源</th>
        <th>年龄<br />性别</th>
        <th>体重</th>
        <th>骨骼肌</th>
        <th>体脂肪</th>
        <th>体脂率</th>
        <th>BMI值</th>
        <th>腰臀比</th>
        <th>基础代谢</th>
        <th>测试时间</th>
      </tr>
    </thead>
    <tbody>
      <c:forEach var="inbodyRecord" items="${inbodyRecords}">
        <tr>
          <td>${inbodyRecord.name}<br />${inbodyRecord.mobile}</td>
          <td>${inbodyRecord.source}</td>
          <td>${inbodyRecord.age}<br />${inbodyRecord.gender.description}</td>
          <td>${inbodyRecord.weightMax}/${inbodyRecord.weightMin}<br />${inbodyRecord.weight}<br />${inbodyRecord.weightLabel}</td>
          <td>${inbodyRecord.smMax}/${inbodyRecord.smMin}<br />${inbodyRecord.sm}<br />${inbodyRecord.smLabel}</td>
          <td>${inbodyRecord.bfMax}/${inbodyRecord.bfMin}<br />${inbodyRecord.bf}<br />${inbodyRecord.bfLabel}</td>
          <td>${inbodyRecord.bfrMax}/${inbodyRecord.bfrMin}<br />${inbodyRecord.bfr}<br />${inbodyRecord.bfrLabel}</td>
          <td>${inbodyRecord.bmiMax}/${inbodyRecord.bmiMin}<br />${inbodyRecord.bmi}<br />${inbodyRecord.bmiLabel}</td>
          <td>${inbodyRecord.whrMax}/${inbodyRecord.whrMin}<br />${inbodyRecord.whr}<br />${inbodyRecord.whrLabel}</td>
          <td>${inbodyRecord.bmMax}/${inbodyRecord.bmMin}<br />${inbodyRecord.bm}<br />${inbodyRecord.bmLabel}</td>
          <td>${inbodyRecord.recordTime}</td>
        </tr>
      </c:forEach>
    </tbody>
  </table>
</c:if>
